<template>
  <div class="main_con">
    <el-card class="box-11">
        <div calss="filler">
          <div class="title12"><h3>发行情报</h3></div>
        </div>
      </el-card>

    <div class="boxx01">
    <el-calendar>
      <template #date-cell="{ data }">
        <div class="custom-date">
        {{ data.day.split("-").slice(2).join("-") }}
        <div style="width: 100%;" v-for="item in dataList" :key="item">
          <el-tag
            type="danger"
            v-if="item.releaseDate == data.day.split('-').slice(0).join('-') "
          >
            {{ item.filmName }}
          </el-tag>
        </div>
      </div>
      </template>
    </el-calendar>
  </div>
  </div>
</template>
 
<script>
export default {
  name: "PatrolSchedule",
  components: {},
  data() {
    return {
      value: new Date(),
      dataList: [],
      scheduleData: [
        {
          workingDay: "02",
          content: "土方开挖",
        },
        {
          workingDay: "03",
          content: "地基验坑",
        },
        {
          workingDay: "04",
          content: "地基回填",
        },
        {
          workingDay: "05",
          content: "基础垫层模",
        },
        {
          workingDay: "06",
          content: "基础垫层混凝土浇筑",
        },
        {
          workingDay: "07",
          content: "基础钢筋绑扎",
        },
      ],
    };
  },
  mounted() {
    var _this = this;
    this.$http.get("/publish/v1/info").then(function (response) {
      console.log(response.data);
      _this.dataList = response.data;

      // 遍历dataList数组
      //  response.data.forEach((item) => {
      //   // 获取当前数据的日期
      //   const date = item.releaseDate
      //   console.log(item.releaseDate);
      // })
    });
  },
  methods: {
  },
};
</script>
<style lang="scss" scoped>
.el-calendar-day {
  box-sizing: border-box;
  padding: 5px;
  height: 80px;
}
.main_con {
  width: 100%;
  background-color: rgb(230, 229, 229);
  overflow: auto;
}

.boxx01{
  width: 98%;
  margin-top: 10px;
  margin-left: 15px;
}
.el-tag{
  margin-left: 6px;
}
.custom-date{
  height: 67px;
  overflow: hidden;


}
</style>